home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / windowwatcher / nsIDialogParamBlock.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  6KB  |  176 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIDialogParamBlock.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIDialogParamBlock_h__
  6. #define __gen_nsIDialogParamBlock_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIMutableArray; /* forward declaration */
  18.  
  19.  
  20. /* starting interface:    nsIDialogParamBlock */
  21. #define NS_IDIALOGPARAMBLOCK_IID_STR "f76c0901-437a-11d3-b7a0-e35db351b4bc"
  22.  
  23. #define NS_IDIALOGPARAMBLOCK_IID \
  24.   {0xf76c0901, 0x437a, 0x11d3, \
  25.     { 0xb7, 0xa0, 0xe3, 0x5d, 0xb3, 0x51, 0xb4, 0xbc }}
  26.  
  27. /**
  28.  * An interface to pass strings, integers and nsISupports to a dialog
  29.  */
  30. class NS_NO_VTABLE nsIDialogParamBlock : public nsISupports {
  31.  public: 
  32.  
  33.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDIALOGPARAMBLOCK_IID)
  34.  
  35.   /** Get or set an interger to pass.
  36.    * Index must be in the range 0..7
  37.    */
  38.   /* PRInt32 GetInt (in PRInt32 inIndex); */
  39.   NS_IMETHOD GetInt(PRInt32 inIndex, PRInt32 *_retval) = 0;
  40.  
  41.   /* void SetInt (in PRInt32 inIndex, in PRInt32 inInt); */
  42.   NS_IMETHOD SetInt(PRInt32 inIndex, PRInt32 inInt) = 0;
  43.  
  44.   /** Set the maximum number of strings to pass. Default is 16.
  45.    * Use before setting any string (If you want to change it from the default).
  46.    */
  47.   /* void SetNumberStrings (in PRInt32 inNumStrings); */
  48.   NS_IMETHOD SetNumberStrings(PRInt32 inNumStrings) = 0;
  49.  
  50.   /** Get or set an string to pass.
  51.     * Index starts at 0
  52.     */
  53.   /* wstring GetString (in PRInt32 inIndex); */
  54.   NS_IMETHOD GetString(PRInt32 inIndex, PRUnichar **_retval) = 0;
  55.  
  56.   /* void SetString (in PRInt32 inIndex, in wstring inString); */
  57.   NS_IMETHOD SetString(PRInt32 inIndex, const PRUnichar *inString) = 0;
  58.  
  59.   /**
  60.    * A place where you can store an nsIMutableArray to pass nsISupports 
  61.    */
  62.   /* attribute nsIMutableArray objects; */
  63.   NS_IMETHOD GetObjects(nsIMutableArray * *aObjects) = 0;
  64.   NS_IMETHOD SetObjects(nsIMutableArray * aObjects) = 0;
  65.  
  66. };
  67.  
  68. /* Use this macro when declaring classes that implement this interface. */
  69. #define NS_DECL_NSIDIALOGPARAMBLOCK \
  70.   NS_IMETHOD GetInt(PRInt32 inIndex, PRInt32 *_retval); \
  71.   NS_IMETHOD SetInt(PRInt32 inIndex, PRInt32 inInt); \
  72.   NS_IMETHOD SetNumberStrings(PRInt32 inNumStrings); \
  73.   NS_IMETHOD GetString(PRInt32 inIndex, PRUnichar **_retval); \
  74.   NS_IMETHOD SetString(PRInt32 inIndex, const PRUnichar *inString); \
  75.   NS_IMETHOD GetObjects(nsIMutableArray * *aObjects); \
  76.   NS_IMETHOD SetObjects(nsIMutableArray * aObjects); 
  77.  
  78. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  79. #define NS_FORWARD_NSIDIALOGPARAMBLOCK(_to) \
  80.   NS_IMETHOD GetInt(PRInt32 inIndex, PRInt32 *_retval) { return _to GetInt(inIndex, _retval); } \
  81.   NS_IMETHOD SetInt(PRInt32 inIndex, PRInt32 inInt) { return _to SetInt(inIndex, inInt); } \
  82.   NS_IMETHOD SetNumberStrings(PRInt32 inNumStrings) { return _to SetNumberStrings(inNumStrings); } \
  83.   NS_IMETHOD GetString(PRInt32 inIndex, PRUnichar **_retval) { return _to GetString(inIndex, _retval); } \
  84.   NS_IMETHOD SetString(PRInt32 inIndex, const PRUnichar *inString) { return _to SetString(inIndex, inString); } \
  85.   NS_IMETHOD GetObjects(nsIMutableArray * *aObjects) { return _to GetObjects(aObjects); } \
  86.   NS_IMETHOD SetObjects(nsIMutableArray * aObjects) { return _to SetObjects(aObjects); } 
  87.  
  88. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  89. #define NS_FORWARD_SAFE_NSIDIALOGPARAMBLOCK(_to) \
  90.   NS_IMETHOD GetInt(PRInt32 inIndex, PRInt32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInt(inIndex, _retval); } \
  91.   NS_IMETHOD SetInt(PRInt32 inIndex, PRInt32 inInt) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetInt(inIndex, inInt); } \
  92.   NS_IMETHOD SetNumberStrings(PRInt32 inNumStrings) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetNumberStrings(inNumStrings); } \
  93.   NS_IMETHOD GetString(PRInt32 inIndex, PRUnichar **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetString(inIndex, _retval); } \
  94.   NS_IMETHOD SetString(PRInt32 inIndex, const PRUnichar *inString) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetString(inIndex, inString); } \
  95.   NS_IMETHOD GetObjects(nsIMutableArray * *aObjects) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetObjects(aObjects); } \
  96.   NS_IMETHOD SetObjects(nsIMutableArray * aObjects) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetObjects(aObjects); } 
  97.  
  98. #if 0
  99. /* Use the code below as a template for the implementation class for this interface. */
  100.  
  101. /* Header file */
  102. class nsDialogParamBlock : public nsIDialogParamBlock
  103. {
  104. public:
  105.   NS_DECL_ISUPPORTS
  106.   NS_DECL_NSIDIALOGPARAMBLOCK
  107.  
  108.   nsDialogParamBlock();
  109.  
  110. private:
  111.   ~nsDialogParamBlock();
  112.  
  113. protected:
  114.   /* additional members */
  115. };
  116.  
  117. /* Implementation file */
  118. NS_IMPL_ISUPPORTS1(nsDialogParamBlock, nsIDialogParamBlock)
  119.  
  120. nsDialogParamBlock::nsDialogParamBlock()
  121. {
  122.   /* member initializers and constructor code */
  123. }
  124.  
  125. nsDialogParamBlock::~nsDialogParamBlock()
  126. {
  127.   /* destructor code */
  128. }
  129.  
  130. /* PRInt32 GetInt (in PRInt32 inIndex); */
  131. NS_IMETHODIMP nsDialogParamBlock::GetInt(PRInt32 inIndex, PRInt32 *_retval)
  132. {
  133.     return NS_ERROR_NOT_IMPLEMENTED;
  134. }
  135.  
  136. /* void SetInt (in PRInt32 inIndex, in PRInt32 inInt); */
  137. NS_IMETHODIMP nsDialogParamBlock::SetInt(PRInt32 inIndex, PRInt32 inInt)
  138. {
  139.     return NS_ERROR_NOT_IMPLEMENTED;
  140. }
  141.  
  142. /* void SetNumberStrings (in PRInt32 inNumStrings); */
  143. NS_IMETHODIMP nsDialogParamBlock::SetNumberStrings(PRInt32 inNumStrings)
  144. {
  145.     return NS_ERROR_NOT_IMPLEMENTED;
  146. }
  147.  
  148. /* wstring GetString (in PRInt32 inIndex); */
  149. NS_IMETHODIMP nsDialogParamBlock::GetString(PRInt32 inIndex, PRUnichar **_retval)
  150. {
  151.     return NS_ERROR_NOT_IMPLEMENTED;
  152. }
  153.  
  154. /* void SetString (in PRInt32 inIndex, in wstring inString); */
  155. NS_IMETHODIMP nsDialogParamBlock::SetString(PRInt32 inIndex, const PRUnichar *inString)
  156. {
  157.     return NS_ERROR_NOT_IMPLEMENTED;
  158. }
  159.  
  160. /* attribute nsIMutableArray objects; */
  161. NS_IMETHODIMP nsDialogParamBlock::GetObjects(nsIMutableArray * *aObjects)
  162. {
  163.     return NS_ERROR_NOT_IMPLEMENTED;
  164. }
  165. NS_IMETHODIMP nsDialogParamBlock::SetObjects(nsIMutableArray * aObjects)
  166. {
  167.     return NS_ERROR_NOT_IMPLEMENTED;
  168. }
  169.  
  170. /* End of implementation class template. */
  171. #endif
  172.  
  173. #define NS_DIALOGPARAMBLOCK_CONTRACTID "@mozilla.org/embedcomp/dialogparam;1"
  174.  
  175. #endif /* __gen_nsIDialogParamBlock_h__ */
  176.